Chris Pollett > Old Classes >
CS158a

( Print View )

Student Corner:
  [Grades Sec1]
  [Grades Sec2]

  [Submit Sec1]
  [Submit Sec2]

  [Class Sign up Sec1]
  [Class Sign up Sec2]

  [
Lecture Notes]

  [Discussion Board]

  [Announcements]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












HW#5 --- last modified February 28 2019 23:13:46..

Solution set.

Due date: May 14

Files to be submitted:
  Hw5.zip

Purpose: To learn about the transport layer, socket programming, and a little about network security.

Related Course Outcomes:

(8) Understand TCP and UDP, and develop software for servers and clients of socket programming, and use them to measure the performance (including throughput and bandwidth) of real networks.

(10) Understand concepts of data compression, network security and protocols.

Specification:

First, do the following problems out of the book: p574 #4, #16, 35, #41, p833 #46. Submit these in the file Hw5.pdf which you put in the ZIP file you submit. Each group member who is turning in a Cisco Lab should also turn in their PDF in Hw5.zip. Also, in this file I want you to put the results of experiments you do with Wireshark/Ethereal (Wireshark is the modern name for Ethereal).For these experiments, you should launch Wireshark and get it capturing data. Then open your e-mail client like Thunderbird/KMail/Mail.app/Outlook/Winmail and send an e-mail to a friend. Stop capturing. Look at each line of the captured data. Broadly categorize these lines and explain what caused each category.

For the last part of the homework, I want you to write a simple spider. It will be run from the command line with a line like:

java Spider host max_num_links_to_return

For example, you might run it with:

java Spider www.cs.sjsu.edu 1000

Your program should output lines like:

[30] [39] www.cs.sjsu.edu/~pollett/

This indicates that following the 39th link off of the page which is the 30th link off of www.cs.sjsu.edu is www.cs.sjsu.edu/~pollett/. Your spider should stop after outputing max_num_links_to_return. Your spider should work by opening a socket connection and making the get requests using http. It should then output the total time its took in communicating with the web-site. This is a challenging project as the job of extracting links from pages is very tricky. Two bonus points will be given to the project which most accurately extracts links. Write us some experiments where you have tried your program on different site. Include these experiments in Hw5.pdf

Point Breakdown

Book problems (1pt each) 5pts
Wireshark Experiment 1pt
Java coding guidelines followed 1pt
Program doesn't crash and uses sockets correctly to make get requests for pages 2pts
Program extracts links accurately 1pt
Total10pts